﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Reflection;
using Etong.Web;
/// <summary>
///DataTypeFactory 的摘要说明
/// </summary>
public class DataTypeFactory
{
	public DataTypeFactory()
	{
		
	}

    public static IDBColumnDataType GetDBColumnDataType()
    {
        return (IDBColumnDataType)Assembly.Load("App_Code").CreateInstance(ConfigGlobal.GetGlobal().DbType + "ColumnType");
    }

    public static ColumnDataType GetColumnDataTyep(string typeStr)
    {
        return ((IDBColumnDataType)Assembly.Load("App_Code").CreateInstance(ConfigGlobal.GetGlobal().DbType + "ColumnType")).GetColumnDataType(typeStr);
    }

    public static string GetSqlValue(string str,ColumnDataType type)
    {
        return ((IDBColumnDataType)Assembly.Load("App_Code").CreateInstance(ConfigGlobal.GetGlobal().DbType + "ColumnType")).GetSqlValue(str,type);
    }
}
